<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<!-- 减少jsp页面的java代码，用el表达式实现 -->
<link href="${pageContext.request.contextPath }/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<c:choose>
	<c:when test="${empty book }">
		<c:out value="您的操作有误"></c:out>
	</c:when>
	<c:otherwise>


<form name="frm01" action="${pageContext.request.contextPath }/book" method="post" onsubmit="return beforeSub()">
	<input type="hidden" name="flag" value="doEdit">
	<input type="hidden" name="id" value="${book.id }">
	<table  class="table">
		<tr>
			<th colspan="2">图书信息修改</th>
		</tr>
		<tr>
			<th width="200px">书名</th>
			<td><input type="text" class="form-control" name="bookName" value="${book.bookName }"></td>
		</tr>
		
		<tr>
			<th>作者</th>
			<td>
				<input type="text" class="form-control" name="author" value="${book.author }">
			</td>
		</tr>
		<tr>
			<th>出版日期</th>
			<td>
				<input type="date" class="form-control" value="${book.pubTime }" name="pubTime">
			</td>
		</tr>
		<tr>
			<th>库存(本)</th>
			<td>
				<input type="text" class="form-control" name="count" value="${book.count }">
			</td>
		</tr>
		
		
		<tr>
			<td colspan="2" align="center">
				<input type="submit"   class="btn btn-primary" value="点击提交">
				<input type="button" class="btn btn-primary" value="返回" onclick="javascript:history.go(-1)">
			</td>
		</tr>
	</table>
	
</form>
</c:otherwise>
</c:choose>
</body>
</html>